﻿Imports System.Windows.Forms

Public Class vsTreeView
    Inherits System.Windows.Forms.TreeView

    Private Const EXPAND As Integer = 0
    Private Const COLLAPSE As Integer = 1

    Private components As System.ComponentModel.IContainer
    Friend WithEvents il As System.Windows.Forms.ImageList

    Public Sub vsTreeView()
        Me.ImageIndex = 0
        Me.ImageList = il
        InitializeComponent()
    End Sub

    Protected Overrides Sub OnAfterExpand(ByVal e As TreeViewEventArgs)
        e.Node.ImageIndex = EXPAND
        e.Node.SelectedImageIndex = EXPAND
        MyBase.OnAfterExpand(e)
    End Sub

    Protected Overrides Sub OnAfterCollapse(ByVal e As System.Windows.Forms.TreeViewEventArgs)
        e.Node.ImageIndex = COLLAPSE
        e.Node.SelectedImageIndex = COLLAPSE
        MyBase.OnAfterCollapse(e)
    End Sub

    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(vsTreeView))
        Me.il = New System.Windows.Forms.ImageList(Me.components)
        Me.SuspendLayout()
        '
        'il
        '
        Me.il.ImageStream = CType(resources.GetObject("il.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.il.TransparentColor = System.Drawing.Color.Transparent
        Me.il.Images.SetKeyName(0, "")
        Me.il.Images.SetKeyName(1, "")
        '
        'vsTreeView
        '
        Me.LineColor = System.Drawing.Color.Black
        Me.ResumeLayout(False)

    End Sub
End Class
